package com.trsj.lnsj.util.ui;

import java.io.IOException;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

/**  

* <p>Title: LongJsonSerializer.java</p>  

* <p>Description: </p>  

* <p>Copyright: Copyright (c) 2018</p>  

* <p>Company: 七色环</p>  

* @author longky  

* @date 2018年9月14日  

* @version 1.0  

*/
public class LongJsonSerializer extends JsonSerializer<Long> {
	    @Override
	    public void serialize(Long value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
	        String text = (value == null ? null : String.valueOf(value));
	        if (text != null) {
	            jsonGenerator.writeString(text);
	        }
	    }
}

